Revert part of #30777 to allow empty strings to be converted to PointCollection#30823
Merged
Revert part of #30777 to allow empty strings to be converted to PointCollection#30823
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reverts part of the changes from #30777 that added validation to prevent null or empty strings from being converted to PointCollection. The change removes the null/whitespace check and associated exception throwing, allowing empty strings to be processed by the conversion logic again.
Key Changes:
- Removes null/whitespace validation that was throwing an InvalidOperationException
- Simplifies the string conversion by removing the null-conditional operator
- Allows empty strings to proceed through the conversion process
Comments suppressed due to low confidence (1)
src/Controls/src/Core/Shapes/PointCollectionConverter.cs:28
- The behavior change of allowing empty strings to be converted to PointCollection should have corresponding test cases to validate the expected behavior. Please ensure test cases exist in TestCases.Shared.Tests that verify empty string conversion works correctly.
string[] points = strValue.Split(new char[] { ' ', ',' });
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PureWeen
approved these changes
Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
The PR #30777 added an additional check that may be incorrect and is now filing tests. Regardless of perfect code, this behavior should be reverted until an investigation is done.
However, I think that the change was more to fix the nullability warnings and the better fix may have been to remove the
?from the ToString part.Issues Fixed
Reverts part of #30777